package com.iss.yunpan.dao;

import com.iss.yunpan.entity.FileContent;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface FileDao {

    List<FileContent> getAllFile(String fileName);

    FileContent getFileContentByFileNameAndParentId(@Param("fileName") String fileName, @Param("parentId") int parentId);

    FileContent getFileContentByFileAbsolute(@Param("fileAbsolute") String fileAbsolute);

    void updateFile(FileContent con);

    void insertFile(FileContent cont);
    void updateFileName(@Param("id")Integer id,@Param("newFileName") String newFileName, @Param("newFileAbsolute")String newFileAbsolute,@Param("fileAbsolute")String fileAbsolute);
    void deleteFile(FileContent con);
    List<FileContent> getAllFile1(String fileName);
    void restoreFile(FileContent con);
    FileContent getFileById(@Param("id") Integer id);
    void delete(FileContent con);



    FileContent getFileContentByPath(String fileAbsolute);
}
